module.exports = {
  show: function(option){
    var that = this;
    that.setData({
      message:{
        content: option.content,
        icon: option.icon,
        visiable: true
      }
    });

    if (typeof option.duration !== 'undefined'){
      setTimeout(function(){
        that.setData({
          message: {
            visiable: false
          }
        })
      }, option.duration);
    }
  },

  hide: function(){
    var that = this;
    that.setData({
      message:{
        visible: false
      }
    });
  }
}